package org.example.session;

import java.sql.Connection;

/**
 * @Author: luyg
 * @Date: 2024/11/11/9:30
 * @Description: 事务类型枚举类
 */
public enum TransactionIsolationLevel {
    //jdbc的事务隔离级别
    NONE(Connection.TRANSACTION_NONE),
    READ_COMMITTED(Connection.TRANSACTION_READ_COMMITTED),
    READ_UNCOMMITTED(Connection.TRANSACTION_READ_UNCOMMITTED),
    REPEATABLE_READ(Connection.TRANSACTION_REPEATABLE_READ),
    SERIALIZABLE(Connection.TRANSACTION_SERIALIZABLE);
    private final int level;
    TransactionIsolationLevel(int level) {
        this.level = level;
    }

    public int getLevel() {
        return level;
    }
}
